1. Field of the Invention
The present invention pertains to a logic synthesis method and device utilizing an HDL (Hardware Description Language), and more particularly, to a logic synthesis method and device that automatically generates from an existing HDL an HDL with hierarchized modified portions.
2. Description of the Related Art
In a conventional LSI function design and logic design, a gate level logic circuit is automatically generated from an HDL such as a Verilog HDL or VHDL with the use of a logic synthesis tool. As for the gate level logic circuit automatically generated from an HDL by use of a logic synthesis tool, equivalence is checked and logic mismatch is detected with the use of a logic equivalence checking tool.
“Logic synthesis” is a technique for generating a gate level logic circuit represented by gate connections in accordance with the functional description written in an HDL, the target timing, and the circuit operation specification such as a circuit size restriction. “Logic equivalence checking” is a technique for checking logic equivalence by transforming an HDL and a gate level logic circuit to be checked into mathematical expressions.
Referring now to FIG. 6, the functional description of an HDL that is a Verilog HDL is described.
FIG. 6 shows the hierarchical structure of an HDL. A TOP layer 26 includes a second layer 27, the second layer 27 includes third layers 28, and the upper layer includes the lower layer. Each layer describes the class inclusion and functions of lower layers between a “module” and an “endmodule”. To describe a function between a “module” and an “endmodule”, an “always” sentence and an “assign” sentence are used. An “always” sentence and an “assign” sentence constitute the smallest functional description unit in an HDL. Since the logic synthesis is performed on the “module” level having a clear input/output terminal, it is carried out for each “module” unit, such as “TOP”, “Sub2”, “Sub3”, and “Sub4”.
For example, in a case of logic synthesis in a Verilog HDL, each “module” is a unit for performing the logic synthesis. If a change needs to be made to a gate level logic circuit due to a modification to the functional specification or a breach of the design rules existing in the technology after the gate level logic circuit is automatically generated, logic re-synthesis is performed with the use of a logic synthesis tool by modifying the HDL. Since an HDL has a hierarchical structure formed with “modules”, logic synthesis is performed for a “module”. Logic re-synthesis after an HDL modification may be performed in an entire HDL. To shorten the execution time required for logic synthesis, however, a gate level logic circuit is automatically generated in the subject layer by performing logic synthesis in the “module” containing a portion to be modified. The existing gate level logic circuit in the layer requiring a modification is then replaced with the automatically generated gate level logic circuit.
Referring now to FIG. 7, an operation flow of the above described logic synthesis tool is described.
The logic synthesis tool carries out a syntax analysis of an HDL 1, to generate an internal format 30 represented in a mathematical expression through a logic transformation 29. Based on the internal format 30, a circuit operation specification 31, and a technology library 32, optimization 33 is performed so that a gate level logic circuit 2 can be automatically generated.
As shown in FIG. 8, in the logic transforming procedure, a transformation into the internal format 30 independent of the technology is carried out after a syntax analysis 34 of the HDL 1.
As shown in FIG. 9, in the optimizing procedure, mapping from the internal format 30 to the gate level logic circuit 2 is performed with the technology library 32. Also, mapping to the gate level logic circuit 2 is performed so as to satisfy the circuit operation specification 31 with respect to the circuit size, the delay time, and the like.
Referring now to FIG. 10, a method for determining whether circuits automatically generated with an HDL and a logic synthesis tool are logically equivalent to each other is described.
A combined circuit parted by FFs (flip-flops) that are a sequential circuit is extracted as a logic cone 36 from the gate level logic circuit 2. A logic cone 36 is also extracted from the HDL. The extracted logic cones 36 are transformed into internal formats (mathematical expressions) 37, and checking is performed to determine whether the internal formats 37 are logically equivalent to each other.
Japanese Patent Application Laid-Open (JP-A) Nos. 2003-196335 (document 1), 2000-215217 (document 2), 10-269271 (document 3) disclose examples of methods for logic resynthesis to be performed when a gate level logic circuit is modified. JP-A No. 2003-058597 (document 4) discloses an example of a difference determining method to be utilized in logic equivalence checking between an HDL and a gate level logic circuit.
In the above described conventional LSI function designs and logic designs, logic re-synthesis is performed with a logic synthesis tool so as to automatically generate a gate level logic circuit after the HDL is modified, if a modification needs to be made to a gate level logic circuit due to a change in functional specification or a breach of the design rules depending on the technology after the gate level logic circuit is automatically generated from an HDL with the use of the logic synthesis tool. In the logic re-synthesis, the “entity” and the “module” containing the portion to be modified in the HDL is the smallest unit. The logic re-synthesis is performed on the “entity” and the “module” including the functional description that does not require a modification.
With respect to the portion on which the logic re-synthesis has been performed, logic equivalence between the HDL and the gate level logic circuit is checked again with the use of a logic equivalence checking tool. A large part of the HDL on which the logic re-synthesis is performed might not have any change in logic, and checking is unnecessarily performed on the portion on which logic equivalence between the HDL and the gate level logic circuit has already been confirmed. In today's increasingly large, highly-integrated, and sophisticated LSIs, the execution time for logic synthesis and logic equivalence checking is becoming longer and longer. Therefore, it is necessary to minimize the portion on which logic re-synthesis is to be performed, and to shorten the execution time for logic synthesis and logic equivalence checking.
The modifying means disclosed in document 2 and document 3, which makes a modification to an existing gate level logic circuit, extracts the different portions between an unmodified HDL and a modified HDL, generates a gate level logic circuit formed with the different portions, detects the different portions in the existing gate level logic circuit, and then performs a replacing operation.
In this conventional structure, however, the different portions between the HDL and the existing gate level logic circuit are not extracted. When a simple modification is made to a gate level logic circuit by replacing a two-input AND gate with a two-input OR gate (the two gate have the same arrangement of input pins and output pins) as in the case of the unmodified and modified gate level logic circuits shown in FIG. 2, a different portion replacement can be performed by changing a two-input AND operation to a two-input OR operation through the extraction of the different portions between the unmodified HDL and the modified HDL shown in FIG. 3. However, when different portions extracted from an unmodified HDL 35 and a modified HDL 36 shown in FIG. 11 are formed with gate level logic circuits having different arrangements of input pins and output pins, it is difficult to detect the portion to be replaced in the existing gate level logic circuit. As a result, a different portion replacement cannot be performed on the existing gate level logic circuit.
Further, when many modifications are to be made to a gate level logic circuit having complicated different portions or to an existing gate level logic circuit optimized through logic synthesis, appropriate extraction of different portions needs to be performed between a modified HDL and an existing gate level logic circuit.